package main

import "math"

// 典型的计数排序，简单简单题
func maxNumberOfBalloons(text string) int {
	s := "ablon"
	cnt := make([]int, 26)
	for _, c := range text {
		cnt[c - 'a'] += 1
	}
	cnt['l'-'a'] /= 2
	cnt['o' - 'a'] /= 2
	m := math.MaxInt32
	for _, c := range s {
		if m > cnt[c - 'a'] {
			m = cnt[c - 'a']
		}
	}
	return m
}
